package org.hertsig.magiccardmarket.entities;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import lombok.AllArgsConstructor;
import lombok.Delegate;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Getter @ToString
@AllArgsConstructor @NoArgsConstructor
@XmlRootElement(name="response")
public class Metaproducts implements Iterable<Metaproducts.Metaproduct> {
	@Delegate(types=Iterable.class) @XmlElement private List<Metaproduct> metaproduct;
	
	@Getter @ToString
	@AllArgsConstructor @NoArgsConstructor
	public static class Metaproduct {
		@XmlElement private String idMetaproduct;
		@XmlElement private List<MetaproductName> name;
		@XmlElement private List<ProductId> products;
	}
	
	@Getter @ToString
	@AllArgsConstructor @NoArgsConstructor
	public static class MetaproductName {
		@XmlElement private String idLanguage;
		@XmlElement private String languageName;
		@XmlElement private String metaproductName;
	}
	
	@Getter @ToString
	@AllArgsConstructor @NoArgsConstructor
	public static class ProductId {
		@XmlElement private List<String> idProduct;
	}
}
